
import React, {Component} from 'react'
import {Icon, Result} from 'antd-mobile';
import './index.less'

class ResultPage extends Component{
	constructor(props) {
		super(props)
	}



	returnMessage() {
		const {data} = this.props;
		return (
			<div className={'desc'}>
				{
					data && <span>经查验，上次登录时间为</span>
				}

				{
					data && <span>{data.createTime || '无'}</span>
				}
				{
					data && <span>个人信息如下</span>
				}
				{
					data && <span>姓名：{data.residentIdText}</span>
				}

				<span>请展示给服务人员即可</span>
			</div>
		)
	}
	render() {
		const {type} = this.props;
		return(
			<div className="result-example">
				<Result
					img={<Icon type="check-circle" className="spe" style={{ fill: '#1F90E6' }} />}
					// title={type === 'in' ? '允许进入' ? '允许出'}
					title={type === 'in' ? "允许进入" : '允许出'}
					message={this.returnMessage()}
				/>
			</div>
		)
	}
}


export default ResultPage
